home *** CD-ROM | disk | FTP | other *** search
- #!../src/moat -f
- # testing using a GC from within tcl
- xtAppInitialize -class Program
-
- xmDrawingArea .d managed -width 300 -height 200
- .d exposeCallback show_text
- set gc1 [.d getGC -foreground yellow -background green]
- set gc2 [.d getGC -foreground blue -background pink]
-
- proc show_text {} {
- global gc1
- global gc2
-
- .d drawImageString $gc1 30 30 "hello"
- .d drawImageString $gc2 30 80 "world"
- }
-
- . realizeWidget
-
- . mainLoop
-